# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=jbig2enc
pkgver=0.29
pkgrel=1
pkgdesc="JBIG2 Encoder"
url="https://github.com/agl/jbig2enc"
arch="all"
license="Apache-2.0"
depends=""
makedepends="
	leptonica-dev
	zlib-dev
	
	automake
	autoconf
	libtool
	"
install=""
subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
source="jbig2enc-$pkgver.tar.gz::https://github.com/agl/jbig2enc/archive/$pkgver.tar.gz"
builddir="$srcdir/jbig2enc-$pkgver"

build() {
	cd "$builddir"
	./autogen.sh
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="aa50cdaf61ef0ae473c8139d8da2a4c374450f8d0d31e2260031e8086dab9201c303c86d50cd51427135bef500718cbc3a53baabf2bf505f8908c22a3d361c51  jbig2enc-0.29.tar.gz"
